package com.lantosec.hmrp.modules.archives.entity;

import java.time.LocalDateTime;
import java.util.Date;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.archives.vo.UserFamilyVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * <p>
 * 家庭主要成员及主要社会关系表 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-06-11
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserFamily extends BaseEntity<UserFamilyVO> {

    private static final long serialVersionUID = 1L;
    public UserFamily(UserFamilyVO vo){
        this.userFamilyId = vo.getUserFamilyId();
        this.userId = vo.getUserId();
        this.idCards = vo.getIdCards();
        this.appellation = vo.getAppellation();
        this.name = vo.getName();
        this.politicalStatus = vo.getPoliticalStatus();
        this.workUnits = vo.getWorkUnits();
        this.phone = vo.getPhone();
        this.emergencyFlag = vo.getEmergencyFlag();
        this.otherRemark = vo.getOtherRemark();
        this.createId = vo.getCreateId();
        this.createUser = vo.getCreateUser();
        this.createTime = vo.getCreateTime();
        this.verifyId = vo.getVerifyId();
        this.verifyUser = vo.getVerifyUser();
        this.verifyTime = vo.getVerifyTime();
        this.verifyStatus = vo.getVerifyStatus();
    }

    @Override
    public UserFamilyVO convertToVO(){
        return new UserFamilyVO(this);
    }


    /**
     * 主键ID
     */
    @TableId(value = "user_family_id", type = IdType.ASSIGN_UUID)
    private String userFamilyId;

    /**
     * user主表ID
     */
    private String userId;

    /**
     * 身份证号
     */
    private String idCards;

    /**
     * 称谓，字典值
     */
    private String appellation;

    /**
     * 姓名
     */
    private String name;

    /**
     * 政治面貌，字典值
     */
    private String politicalStatus;

    /**
     * 工作单位
     */
    private String workUnits;

    /**
     * 手机号码
     */
    private String phone;

    /**
     * 是否为紧急联系人（0：否，1：是）
     */
    private Integer emergencyFlag;

    /**
     * 其他需要说明的情况
     */
    private String otherRemark;

    /**
     * 创建人ID
     */
    private String createId;

    /**
     * 创建人姓名
     */
    private String createUser;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 审核人ID
     */
    private String verifyId;

    /**
     * 审核人姓名
     */
    private String verifyUser;

    /**
     * 审核时间
     */
    private Date verifyTime;

    /**
     * 审核状态（0：未审核，1：以审核）
     */
    private Integer verifyStatus;


    public enum ColName {
        user_family_id, user_id, id_cards, appellation, name, political_status, work_units, phone, emergency_flag, other_remark, create_id, create_user, create_time, verify_id, verify_user, verify_time, verify_status,
    }
}
